package com.sj.增删改查结点;

/**
 * @author sj
 * @date 2021/5/3
 **/
public class 反转链表 {
    public static LinkNode reverseLinked(LinkNode head){
        if (head == null || head.next == null)return head;

        LinkNode newHead = reverseLinked(head.next);
        head.next.next = head;
        head.next = null;
        return newHead;
    }
}
